//
//  VideoViewController.h
//  iFarmacia
//
//  Created by Jose Lino on 12/8/10.
//  Copyright 2011 Skymedia. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
#import "Dados.h"
#import "ARGeoCoordinate.h"


@class ARController;

@interface VideoViewController : UIViewController <CLLocationManagerDelegate, UITabBarDelegate> {
	
	ARController *arController;
	bool						arView;
	NSMutableArray				*arrFarm, *arrSeta, *arrDistancia, *arrayDados;
	NSMutableDictionary			*DictDados;
	NSArray						*arrLL;
	double						latitudeAtual, longitudeAtual;
	CLLocationManager			*locationManager;
	CLLocationDirection			lastKnownHeadingInRadians;
	Dados						*myDados;
	Farm						*farmObj;
	UIView						*bussolaView, *ARView;
	UIImageView					*pointView, *myImage, *setaImage, *setaImage0, *setaImage1, *setaImage2, *setaImage3, *setaImage4, *setaImage5, *setaImage6, *setaImage7, *setaImage8, *setaImage9;
	UILabel						*tituloLabel0, *tituloLabel1, *tituloLabel2, *tituloLabel3, *tituloLabel4, *tituloLabel5, *tituloLabel6, *tituloLabel7, *tituloLabel8, *tituloLabel9, *metrosLabel0, *metrosLabel1, *metrosLabel2, *metrosLabel3, *metrosLabel4, *metrosLabel5, *metrosLabel6, *metrosLabel7, *metrosLabel8, *metrosLabel9;
	UILabel						*tituloLabe, *metrosLabel;
	float						fLat, fLon;
	UIInterfaceOrientation		orientation;
	ARGeoCoordinate				*tempCoordinate;
	CLLocation					*tempLocation;
	UINavigationController *navigation;
	UITabBar *tabBarView;
	UITabBarItem *btMapa;
	UITabBarItem *btVideo;
	UITabBarItem *btFavoritos;
	UITabBarItem *btSobre;
}

@property (nonatomic, retain) ARController *arController;
@property (nonatomic, retain) UIView *bussolaView, *ARView;

- (void) initWithObject:(NSMutableArray *) array;
-(double) CalculateDistance:(double) nLat1 Lon:(double) nLon1 Lat:(double) nLat2 Long:(double) nLon2 indice:(int)onde;
-(double) computeAngleFrom:(CLLocation*)from  to:(CLLocation*)to;
-(void)viewBussola;
-(void)viewAR;
- (void) criaTabBar; 
- (void)deviceOrientationDidChange:(NSNotification *)notification;
@end
